package net.xinqushi.design.prototype;

public abstract class Prototype implements Cloneable {

    String spoonName;

    public void setSpoonName(String spoonName) {
        this.spoonName = spoonName;
    }

    public String getSpoonName() {
        return this.spoonName;
    }

    public  <T> T  clone(Class<T> clazz) {
        Object object = null;
        try {
            object = super.clone(); // weak clone
        } catch (CloneNotSupportedException exception) {
            System.err.println("AbstractSpoon is not Cloneable");
        }
        return (T)object;
    }
}
